home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15380 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  39 lines

  1. Path: news.interpath.net!softbase
  2. From: softbase@mercury.interpath.com (Scott McMahan - Softbase Systems)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: dos.h equivalent in gcc or cc ?
  5. Date: 18 Apr 1996 19:43:19 GMT
  6. Organization: Interpath -- Providing Internet access to North Carolina
  7. Distribution: inet
  8. Message-ID: <4l660n$a0@news.interpath.net>
  9. References: <3173B701.41C6@ieec.fcr.es> <4l5jcr$de1@news.interpath.net> <danpop.829847079@news.cern.ch>
  10. NNTP-Posting-Host: mercury.interpath.com
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Dan Pop (danpop@mail.cern.ch) wrote:
  14. : >int _argc;
  15. : >char **_argv;
  16. : >
  17. : >int main(int argc, char **argv) {
  18. : >
  19. : >    _argv = argv; _argc = argc;
  20. : >}
  21.  
  22. : You forgot a small detail:
  23.  
  24. : ANSI classic 4.1.2: All external identifiers that begin with an underscore
  25. : are reserved.
  26.  
  27. That's true, and that's why Borland put the _ in front of them in
  28. the first place, to keep them out of the user namespace. (They
  29. probably should begin with __!)
  30.  
  31. It's not an ideal solution, but it's a dirty hack to make the program
  32. work. If it interferes with symbols defined by the implementation
  33. to which this code is being ported, then it's time to get rid of
  34. the non-standard junk and go with the standard command line
  35. argument convention.
  36.  
  37. Scott
  38.  
  39.